    .globl {{id_prefix}}main
{{id_prefix}}main:
    pushq	%rbp
    movq	%rsp, %rbp
    # allocate stack space for result struct
    subq    $32, %rsp
    movq    %rsp, %rdi # rsp points to result space
    movq    $0, %rax # make sure RAX isn't a valid pointer to start
    callq   {{id_prefix}}return_in_mem
    # check result, using RAX as base pointer
    cmpq    $1, 0(%rax)
    jne {{local_prefix}}fail
    cmpq    $2, 8(%rax)
    jne {{local_prefix}}fail
    cmpq    $3, 16(%rax)
    jne {{local_prefix}}fail
    # success
    movq    $0, %rax
    movq    %rbp, %rsp
    popq    %rbp
    retq
{{local_prefix}}fail:
    # fail - raise SIGSEGV
    movl	$11, %edi
    callq	{{id_prefix}}raise{{plt_suffix}}
    movq    %rbp, %rsp
    popq    %rbp
    retq
{{execstack_note}}